<?php

namespace addons\yunfood\model;

use addons\yunfood\library\Logic;
use addons\yunfood\library\ModelTrait;
use think\Model;

/**
 * 短信 - 验证码
 */
class SmsCode extends Model
{
    use ModelTrait;

    // 表名,不含前缀
    protected $name = 'yunfood_sms_code';

    // 自动写入时间戳字段
    protected $autoWriteTimestamp = true;

    // 定义时间戳字段名
    protected $updateTime = 'updated_at';
    protected $createTime = 'created_at';

    protected $resultSetType = 'collection';

    // 状态
    const STATE_ING = 1;
    const STATE_END = 2;
    public static $stateList = [
        self::STATE_ING => '未验证',
        self::STATE_END => '已验证',
    ];
}
